package com.lft.examsys.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lft.examsys.entity.Item;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author ：Qingchen
 * @date ：Created in 2022/3/30 14:32
 * @description：题目接口
 * @modified By：
 * @version: $
 */
@Mapper
public interface ItemMapper extends BaseMapper<Item> {
    Boolean insertSelective(Item item);

    List<Item> selectByPaperId(Integer id);

    Boolean insertValues(String title, String content, String answer, String type_id);

    List<Item> randomItems(Integer limitation);

    Boolean deleteItemsByPaperId(Integer id);

    String selectAnswerById(Integer id);

    Page<Item> getAllByPaperId(Page<Item> pageInfo, @Param("id") Integer id);
}
